perm filename A10[106,RWF] blob sn#751357 filedate 1984-04-17 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	CS106
C00008 ENDMK
C⊗;
CS106


It's 10:00 P.M.  Do you know what lecture your instructor of introductory
programming is preparing?  

Thesis:

(1)  The Dynamic Programming paradigm belongs in the introductory programming course.

     Examples: Best-match spelling correction, protein amino-acid sequence matching,
     change-making, parsing, triangulation, backgammon equities, locating large
     unobstructed regions, products of several matrices.

(2)  Recursion as a paradigm (not merely as a language feature) belongs in the
     introductory programming course.

     Examples: Counting connected regions, rules of Go, adaptive integration,
     sorting, word frequency counting, dynamic programming.

(3)  Program verification using invariants and well-ordering belongs in the
     introductory programming course.

     Examples: Elementary arithmetic, binary multiplication and exponentiation,
     Euclidean algorithm, sorting, binary search (very bug-prone if not verified).

(4)  The Divide-and-Conquer paradigm belongs in the introductory programming course.

     Examples: binary search, merge sorting, word frequency counting, adaptive
     integration.

(5)  Iterative refinement as a paradigm belongs in the introductory programming 
     course.

     Examples: Newton's square root algorithm without calculus; all valid  x←f(x)
     methods.

Just as student drivers should be aware that a headon collision can ruin your
whole day, programmers should learn the rationale for professionalism in
programming.  So:

(6)  A set of professional standards for design and testing belongs in the
     introductory programming course.

     (A) All code should be non-trivially executed.
     (B) All tests should be executed at their threshold values.
     (C) All inputs, iteration bounds, parameters, etc. should be tested at their
         extreme values.
     (D) Out-of-range input should be detected.
     (E) No system default error activity should be allowed to occur.
     (F) All interactive input should be logged.
     (G) All non-bulk input should be echoed. 
     (H) All computation should be reproducible.    
     (I) All physical limitations of the computing system (e.g., output page width)
         should be anticipated in the program.

      .
      .
      .
     (Z)
     (AA)
     (BB)
      .
      .
      .

(7)  The introductory programming course should contain a full set of cautionary 
     tales.

     Examples: The Cleveland tax base. The incoming Soviet nuclear moon.  For the
     want of a comma, the missile was lost.  The Apollo altimeter.  The bill for 
     $0.00.  The Vancouver Stock Exchange truncated index.  How to find  
     ln(2)  to zero significant digits.  How to make one million mistakes 
     per second.

(8)  The introductory programming course should teach enough about numerical
     precision in the small and in the large to alert the novice to  potential 
     hazards.

     Examples:  1 - 1/2 + 1/3 - 1/4 + ... - 1/10000, FOR I:=0 STEP 2/3 TO 2 DO,
	APPROXDERIV:=1E6*(F(X + 0.000001) - F(X))

(9)  The introductory programming course should make no effort to teach the entire
     Pascal (or PL-I, or whatever) syntax and semantics.

     Examples: dynamic _own_ arrays, variant records, conformant gizmos,...

(10) The intro course should teach basics of Monte Carlo methods, including
     pitfalls, seeds and their usage, evaluating rand #gers, etc.

Elementary graphics belongs in the introductory programming course.  Examples:
Drawing a straight line at any angle.  Shading the interior of a polygon.
Convexity.  Parametric curves.  Animation.